procd: remove pidfile after unexpected termination without respawn
authorJurgen Van Ham <[email protected]>
Tue, 5 Jul 2016 07:57:18 +0000 (09:57 +0200)
committerJohn Crispin <[email protected]>
Tue, 5 Jul 2016 08:20:16 +0000 (10:20 +0200)
When procd detects a daemon halts and it is not configured to
be respawned, the pidfile has to be removed.

Signed-off-by: Jurgen Van Ham <[email protected]>
service/instance.c

index dccf4b4d231a437a89cbe36c4f070c6f9e95805c..d7d1f82eac318127cc3d01a54f68e77edc9bd5ea 100644 (file)
@@ -513,7 +513,7 @@ instance_exit(struct uloop_process *p, int ret)
 
        uloop_timeout_cancel(&in->timeout);
        if (in->halt) {
-               /* no action */
+               instance_removepid(in);
        } else if (in->restart) {
                instance_start(in);
        } else if (in->respawn) {